﻿using System;
using System.Collections.Generic;
using System.Text;

namespace USERS.CYT369.COM.MODELS.Articles
{
    public class Document : BaseObject<long>
    {
        /// <summary>
        /// 内容类型：1-文本内容, 2-视频，3-图片集
        /// </summary>
        public int ContentType { get; set; }

        /// <summary>
        /// 内容创作类型：1-原创；2-转载; 3-翻译
        /// </summary>
        public int ContentSourceID { get; set; }

        /// <summary>
        /// 参考 UserDocCategory
        /// </summary>
        public long DocumentTypeID { get; set; }

        /// <summary>
        /// 预览图片
        /// </summary>
        public string PreviewImg { get; set; }

        /// <summary>
        /// 标题
        /// </summary>
        public string Title { get; set; }

        /// <summary>
        /// 摘要
        /// </summary>
        public string Summary { get; set; }

        /// <summary>
        /// 作者
        /// </summary>
        public string Author { get; set; }

        /// <summary>
        /// 点击阅读量
        /// </summary>
        public int Read { get; set; }

        /// <summary>
        /// 点赞量
        /// </summary>
        public int Great { get; set; }

        /// <summary>
        /// 是否开启评论功能
        /// </summary>
        public bool CanComment { get; set; }

        /// <summary>
        /// 是否广告
        /// </summary>
        public bool IsAds { get; set; }

        /// <summary>
        /// 直接跳转来源
        /// </summary>
        public bool GotoTarget { get; set; }

        /// <summary>
        /// 目标链接
        /// </summary>
        public string TargetURL { get; set; }

        #region 创建修改时间
        /// <summary>
        /// 创建年
        /// </summary>
        public int Year { get; set; }
        /// <summary>
        /// 创建月
        /// </summary>
        public int Month { get; set; }
        /// <summary>
        /// 创建日
        /// </summary>
        public int Day { get; set; }

        /// <summary>
        /// 修改时间
        /// </summary>
        public DateTime ChangedTime { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreatedTime { get; set; }
        #endregion

        #region Editor
        /// <summary>
        /// 编辑人员ID
        /// </summary>
        public long EditorUserID { get; set; }

        /// <summary>
        /// 编辑人员
        /// </summary>
        public string EditorName { get; set; }

        /// <summary>
        /// 编辑人员真实姓名
        /// </summary>
        public string EditorFullName { get; set; }
        #endregion

        #region audit
        /// <summary>
        /// 是否审核通过: 0-未提交审核，1-通过审核，2-未通过审核, 10-提交审核
        /// </summary>
        public int AuditStatusID { get; set; }

        #endregion

        #region published
        /// <summary>
        /// 是否发布
        /// </summary>
        public bool Published { get; set; }

        /// <summary>
        /// 发布时间
        /// </summary>
        public DateTime? PublishTime { get; set; }
        #endregion

        /// <summary>
        /// 是否删除
        /// </summary>
        public bool Deleted { get; set; }

        public DocumentExt DocExt { get; set; }

        public ICollection<DocAttachment> Attachments { get; set; } = new HashSet<DocAttachment>();

    }

}
